// gcc wrdbg.c -fPIC -shared -O3 -std=c99 -o libwrdbg.so
#include "wrdbg.h"

// 全局宏定义

void ExceptLink_Construct(struct ExceptLink* object){
    object->err = 0;
    memset(object->description, 0, ExceptLink_Desciption_Length);
}

void _raise_c(int err_no, const char* description, struct ExceptLink *module){
    if(0 == err_no){
        printf("In Function Raise() can't set err_no zero.\n");
        abort();
    }
    module->err = err_no;
    strncpy(module->description, description, ExceptLink_Desciption_Length);
    longjmp(module->jmp_buffer, err_no);
}
